﻿<!doctype html>
<html class="no-js" lang="zxx">
<head>
    <meta charset="utf-8">
    <meta http-equiv="x-ua-compatible" content="ie=edge">
    <title>Addina - 网上图书商城</title>
    <script src="../../../console-ban.min.js"></script>
    <meta name="description" content="">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="shortcut icon" type="image/x-icon" href="../../imgs/furniture/favicon.png">
    <link rel="stylesheet" href="../../css/bootstrap.min.css">
    <link rel="stylesheet" href="../../css/meanmenu.min.css">
    <link rel="stylesheet" href="../../css/animate.css">
    <link rel="stylesheet" href="../../css/swiper.min.css">
    <link rel="stylesheet" href="../../css/slick.css">
    <link rel="stylesheet" href="../../css/magnific-popup.css">
    <link rel="stylesheet" href="../../css/fontawesome-pro.css">
    <link rel="stylesheet" href="../../css/spacing.css">
    <link rel="stylesheet" href="../../css/main.css">
</head>
<body>
<div id="preloader">
    <div class="bd-loader-inner">
        <div class="bd-loader"><span class="bd-loader-item"></span><span class="bd-loader-item"></span><span
                class="bd-loader-item"></span><span class="bd-loader-item"></span><span
                class="bd-loader-item"></span><span class="bd-loader-item"></span><span
                class="bd-loader-item"></span><span class="bd-loader-item"></span></div>
    </div>
</div>
<div class="backtotop-wrap cursor-pointer">
    <svg class="backtotop-circle svg-content" width="100%" height="100%" viewbox="-1 -1 102 102">
        <path d="M50,1 a49,49 0 0,1 0,98 a49,49 0 0,1 0,-98"></path>
    </svg>
</div>
<div class="df-search-area">
    <div class="container">
        <div class="row">
            <div class="col-xl-12">
                <div class="df-search-form">
                    <div class="df-search-close text-center mb-20">
                        <button class="df-search-close-btn df-search-close-btn"></button>
                    </div>
                    <form action="#">
                        <div class="df-search-input mb-10"><input type="text" placeholder="Search for product...">
                            <button type="submit"><i class="flaticon-search-1"></i></button>
                        </div>
                        <div class="df-search-category"><span>Search by:</span><a href="#">Healthline,</a><a href="#">COVID-19,</a><a
                                href="#">Surgery,</a><a href="#">Surgeon,</a><a href="#">Medical research</a></div>
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>
<div class="body-overlay"></div>
<header>
    <div class="header">
        <div class="header-top-area grocery__top-header">
            <div class="header-layout-4">
                <div class="header-to-main d-none d-sm-flex">
                    <div class="link-text"><span><img src="../../imgs/icons/call.png" alt=""></span><a
                            href="">4001066666-5</a></div>
                    <div class="header-top-notice d-none d-lg-block">
                        <p>热烈庆祝新店开业！为答谢广大顾客的支持与厚爱，特推出限时折扣活动，优惠多多，不容错过！</p>
                    </div>
                    <div class="tp-header-top-menu d-flex align-items-center justify-content-end">
                        <div class="header-lang-item tp-header-setting">
                            <ul>
                                <li><a class="furniture-clr-hover" href="/url/info">个人信息</a></li>
                                <li><a class="furniture-clr-hover" href="/url/cart">购物车</a></li>
                                <li><a class="furniture-clr-hover" href="/url/login">退出登录</a></li>
                            </ul>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <div class="header-layout-4 header-bottom">
            <div id="header-sticky" class="header-4">
                <div class="mega-menu-wrapper">
                    <div class="header-main-4">
                        <div class="header-left">
                            <div class="header-logo"><a href="/url/index"><img src="../../imgs/furniture/logo/logo.svg"
                                                                               alt="logo not found"></a></div>
                            <div class="mean__menu-wrapper furniture__menu d-none d-lg-block">
                                <div class="main-menu">
                                    <nav id="mobile-menu">
                                        <ul>
                                            <li><a href="/url/index">主页</a></li>
                                            <li class="has-dropdown"><a href="/url/prolist">图书选购</a>
                                                <ul class="submenu">
                                                    <li><a href="/url/prolist">图书选购</a></li>
                                                    <li><a href="/url/cart">购物车</a></li>
                                                </ul>
                                            </li>
                                            <li class="has-dropdown"><a href="/url/prolist">图书分类</a>
                                                <ul class="submenu">
                                                    <li><a href="/url/prolist">教育</a></li>
                                                    <li><a href="/url/prolist">小说</a></li>
                                                    <li><a href="/url/prolist">文艺</a></li>
                                                    <li><a href="/url/prolist">动漫</a></li>
                                                    <li><a href="/url/prolist">童书</a></li>
                                                    <li><a href="/url/prolist">人文社科</a></li>
                                                    <li><a href="/url/prolist">经管</a></li>
                                                    <li><a href="/url/prolist">成功/励志</a></li>
                                                    <li><a href="/url/prolist">生活</a></li>
                                                    <li><a href="/url/prolist">科技</a></li>
                                                    <li><a href="/url/prolist">进口原版</a></li>
                                                </ul>
                                            </li>
                                        </ul>
                                    </nav>
                                </div>
                            </div>
                        </div>
                        <div class="header-right d-inline-flex align-items-center justify-content-end">
                            <div class="header-search d-none d-xxl-block">
                                <form id="form" action="" onsubmit="return false;"><input type="text" placeholder="搜索图书..." v-model="keyword" @change="listProduct()">
                                    <button type="submit">
                                        <svg width="18" height="18" viewbox="0 0 18 18" fill="none"
                                             xmlns="http://www.w3.org/2000/svg">
                                            <path d="M13.4443 13.4445L16.9999 17" stroke="white" stroke-width="2"
                                                  stroke-linecap="round" stroke-linejoin="round"></path>
                                            <path d="M15.2222 8.11111C15.2222 12.0385 12.0385 15.2222 8.11111 15.2222C4.18375 15.2222 1 12.0385 1 8.11111C1 4.18375 4.18375 1 8.11111 1C12.0385 1 15.2222 4.18375 15.2222 8.11111Z"
                                                  stroke="white" stroke-width="2"></path>
                                        </svg>
                                    </button>
                                </form>
                            </div>
                            <div class="header-action d-flex align-items-center ml-30">
                                <div class="header-action-item"><a href="/url/cart"
                                                                   class="header-action-btn cartmini-open-btn">
                                    <svg width="21" height="23" viewbox="0 0 21 23" fill="none"
                                         xmlns="http://www.w3.org/2000/svg">
                                        <path d="M14.0625 10.6C14.0625 12.5883 12.4676 14.2 10.5 14.2C8.53243 14.2 6.9375 12.5883 6.9375 10.6M1 5.8H20M1 5.8V13C1 20.6402 2.33946 22 10.5 22C18.6605 22 20 20.6402 20 13V5.8M1 5.8L2.71856 2.32668C3.12087 1.5136 3.94324 1 4.84283 1H16.1571C17.0568 1 17.8791 1.5136 18.2814 2.32668L20 5.8"
                                              stroke="black" stroke-width="2" stroke-linecap="round"
                                              stroke-linejoin="round"></path>
                                    </svg>
                                    <!--                                    <span class="header-action-badge bg-furniture">12</span>-->
                                </a></div>
                            </div>
                            <div class="header-humbager ml-30" id="header-setting-toggle">
                                <a class="sidebar__toggle">
                                    <div class="bar-icon-2"><span></span><span></span><span></span></div>
                                </a>
                                <div class="header__hamburger ml-50 d-none">
                                    <button type="button" class="hamburger-btn offcanvas-open-btn"><span>01</span><span>01</span><span>01</span>
                                    </button>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</header>
<main>
    <div class="breadcrumb__area theme-bg-1 p-relative z-index-11 pt-95 pb-95">
        <div class="breadcrumb__thumb" data-background="../../imgs/bg/breadcrumb-bg-furniture.jpg"></div>
        <div class="container">
            <div class="row justify-content-center">
                <div class="col-xxl-12">
                    <div class="breadcrumb__wrapper text-center"><h2 class="breadcrumb__title">图书评价</h2>
                        <div class="breadcrumb__menu">
                            <nav>
                                <ul>
                                    <li><span><a href="index.html">主页</a></span></li>
                                    <li><span>图书评价</span></li>
                                </ul>
                            </nav>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <div class="product__details-area section-space-medium">
        <div class="container">
            <div class="product__details-additional-info">
                <div class="row">
                    <div class="col-xxl-3 col-xl-3 col-lg-4 col-md-6 col-sm-6">
                        <div class="product-item">
                            <div class="product-badge"><span class="product-trending">9折</span>
                            </div>
                            <div class="product-thumb"><a :href="'/url/prodetail/'+product.proid">
                                <img v-if="product.mainimage == null" src="../../imgs/img.png" height="390px" alt="">
                                <img v-if="product.mainimage != null" :src="product.mainimage" height="390px" alt="">
                            </a></div>
                            <div class="product-action-item">
                                <button type="button" class="product-action-btn">
                                    <svg width="26" height="18" viewbox="0 0 26 18" fill="none"
                                         xmlns="http://www.w3.org/2000/svg">
                                        <path d="M13.092 4.55026C10.5878 4.55026 8.55683 6.58125 8.55683 9.08541C8.55683 11.5896 10.5878 13.6206 13.092 13.6206C15.5961 13.6206 17.6271 11.5903 17.6271 9.08541C17.6271 6.5805 15.5969 4.55026 13.092 4.55026ZM13.092 12.1089C11.4246 12.1089 10.0338 10.7196 10.0338 9.05216C10.0338 7.38473 11.3898 6.02872 13.0572 6.02872C14.7246 6.02872 16.0807 7.38473 16.0807 9.05216C16.0807 10.7196 14.7594 12.1089 13.092 12.1089ZM25.0965 8.8768C25.0875 8.839 25.092 8.79819 25.0807 8.76115C25.0761 8.74528 25.0655 8.73621 25.0603 8.7226C25.0519 8.70144 25.0542 8.67574 25.0429 8.65533C22.8441 3.62131 18.1064 0.724854 13.0572 0.724854C8.00807 0.724854 3.17511 3.61677 0.975559 8.65079C0.966488 8.67196 0.968 8.69388 0.959686 8.71806C0.954395 8.73318 0.943812 8.74074 0.938521 8.7551C0.927184 8.7929 0.931719 8.83296 0.92416 8.8715C0.910555 8.93953 0.897705 9.00605 0.897705 9.07483C0.897705 9.14361 0.910555 9.20862 0.92416 9.2774C0.931719 9.31519 0.926428 9.35677 0.938521 9.39229C0.943057 9.40968 0.954395 9.41648 0.959686 9.4316C0.967244 9.45201 0.965732 9.4777 0.975559 9.49887C3.17511 14.5314 7.96121 17.381 13.0104 17.381C18.0595 17.381 22.8448 14.5374 25.0436 9.5034C25.055 9.48148 25.0527 9.45956 25.061 9.43538C25.0663 9.42253 25.0761 9.4127 25.0807 9.39758C25.092 9.36055 25.089 9.32049 25.0965 9.28118C25.1101 9.21315 25.1222 9.14739 25.1222 9.0771C25.1222 9.01058 25.1094 8.94482 25.0958 8.87604L25.0965 8.8768ZM13.0104 15.8692C8.72841 15.8692 4.51298 13.6123 2.44193 9.07407C4.49333 4.55177 8.76469 2.23582 13.0572 2.23582C17.349 2.23582 21.5251 4.55404 23.5773 9.07861C21.5266 13.6002 17.3036 15.8692 13.0104 15.8692Z"
                                              fill="white"></path>
                                    </svg>
                                    <span class="product-tooltip">查看</span></button>
                            </div>
                            <div class="product-content">
<!--                                <div class="product-tag"><span>刘慈欣，重庆出版社</span></div>-->
                                <h4 class="product-title"><a :href="'/url/prodetail/'+product.proid" v-text="product.name">三体：全三册</a></h4>
                                <div class="product-price"><span class="product-old-price"><del v-text="'￥'+product.price">￥15.00</del></span><span
                                        class="product-new-price" v-text="'￥'+product.disprice">￥12.00</span></div>
                            </div>
                        </div>
                    </div>
                    <div class="col-xxl-9 col-xl-8 col-lg-8">
                        <div class="product__details-more-tab-content">
                            <div class="tab-content" id="productmorecontent">
                                <div class="tab-pane fade active show" id="nav-review" role="tabpanel"
                                     aria-labelledby="nav-review-tab">
                                    <div class="product__details-review">
                                        <div class="product__details-comment section-space-medium-bottom">
                                            <div class="comment-title mb-20">
                                                <h3>发布评价</h3>
                                                <p>发表您对这本图书的评价，感觉您的意见</p>
                                            </div>
                                            <div class="comment-rating mb-20">
                                                <span>星级评价</span>
                                                <ul>
                                                    <li><a href="#"><i class="fas fa-star"></i></a></li>
                                                    <li><a href="#"><i class="fas fa-star"></i></a></li>
                                                    <li><a href="#"><i class="fas fa-star"></i></a></li>
                                                    <li><a href="#"><i class="fas fa-star"></i></a></li>
                                                    <li><a href="#"><i class="fal fa-star"></i></a></li>
                                                </ul>
                                            </div>
                                            <div class="comment-input-box">
                                                <form action="" onsubmit="return false;">
                                                    <div class="row">
                                                        <div class="col-xxl-12">
                                                            <div class="comment-input">
                                                                <textarea placeholder="您的评价" v-model="review.content" v-text="review != null ? review.content : ''"></textarea>
                                                            </div>
                                                        </div>
                                                        <div class="col-xxl-12">
                                                            <div class="comment-submit">
                                                                <button type="submit" class="fill-btn" @click="addReview()">
                                                                    <span class="fill-btn-inner">
                                                                    <span class="fill-btn-normal">发表评价</span>
                                                                    <span class="fill-btn-hover">发表评价</span>
                                                                    </span>
                                                                </button>
                                                            </div>
                                                        </div>
                                                    </div>
                                                </form>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</main>
<footer class="footer-bg">
    <div class="footer-area pt-100 pb-20">
        <div class="footer-style-4">
            <div class="container">
                <div class="footer-grid-3">
                    <div class="footer-widget-4">
                        <div class="footer-logo mb-35"><a href="/url/index"><img
                                src="../../imgs/furniture/logo/logo-light.svg" alt="image bnot found"></a></div>
                        <p>汇聚万千好书，点亮智慧之光，我们的书店网站，您的阅读天堂！</p>
                        <div class="theme-social"><a class="furniture-bg-hover" href="#"><i
                                class="fa-brands fa-facebook-f"></i></a><a class="furniture-bg-hover" href="#"><i
                                class="fa-brands fa-twitter"></i></a><a class="furniture-bg-hover" href="#"><i
                                class="fa-brands fa-linkedin-in"></i></a><a class="furniture-bg-hover" href="#"><i
                                class="fa-brands fa-instagram"></i></a></div>
                    </div>
                    <div class="footer-widget-4">
                        <div class="footer-widget-title"><h4>服务</h4></div>
                        <div class="footer-link">
                            <ul>
                                <li><a href="/url/register">注册</a></li>
                                <li><a href="/url/login">登录</a></li>
                            </ul>
                        </div>
                    </div>
                    <div class="footer-widget-4">
                        <div class="footer-widget-title"><h4>商城</h4></div>
                        <div class="footer-link">
                            <ul>
                                <li><a href="/url/prolist">图书选购</a></li>
                                <li><a href="/url/cart">购物车</a></li>
                            </ul>
                        </div>
                    </div>
                    <div class="footer-widget footer-col-4">
                        <div class="footer-widget-title"><h4>联系方式</h4></div>
                        <div class="footer-info mb-35">
                            <div class="footer-info-item d-flex align-items-start pb-15 pt-15">
                                <div class="footer-info-icon mr-20"><span><i
                                        class="fa-solid fa-location-dot furniture-icon"></i></span></div>
                                <div class="footer-info-text"><a class="furniture-clr-hover" target="_blank"
                                                                 href="">北京市东城区藏经馆胡同17号1幢A103室</a></div>
                            </div>
                            <div class="footer-info-item d-flex align-items-start">
                                <div class="footer-info-icon mr-20"><span><i
                                        class="fa-solid fa-phone furniture-icon"></i></span></div>
                                <div class="footer-info-text"><a class="furniture-clr-hover" href="tel:012-345-6789">4001066666-5</a></div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <div class="container">
        <div class="footer-copyright-area b-t">
            <div class="footer-copyright-wrapper">
                <div class="footer-copyright-text"><p class="mb-0">© All Copyright 2024 by <a target="_blank"
                                                                                              class="furniture-clr-hover"
                                                                                              href="/url/index">Addina</a>
                </p></div>
                <div class="footer-payment d-flex align-items-center gap-2">
                    <div class="footer-payment-item mb-0">
                        <div class="footer-payment-thumb"><img src="../../imgs/icons/payoneer.png" alt=""></div>
                    </div>
                    <div class="footer-payment-item mb-0">
                        <div class="footer-payment-thumb"><img src="../../imgs/icons/maser.png" alt=""></div>
                    </div>
                    <div class="footer-payment-item">
                        <div class="footer-payment-thumb"><img src="../../imgs/icons/paypal.png" alt=""></div>
                    </div>
                </div>
                <div class="footer-conditions">
                    <ul>
                        <li><a class="furniture-clr-hover" href="#">经营许可</a></li>
                        <li><a class="furniture-clr-hover" href="#">隐私政策</a></li>
                    </ul>
                </div>
            </div>
        </div>
    </div>
</footer>
<script src="../../js/jquery-3.6.0.min.js"></script>
<script src="../../js/waypoints.min.js"></script>
<script src="../../js/bootstrap.bundle.min.js"></script>
<script src="../../js/meanmenu.min.js"></script>
<script src="../../js/swiper.min.js"></script>
<script src="../../js/slick.min.js"></script>
<script src="../../js/magnific-popup.min.js"></script>
<script src="../../js/counterup.js"></script>
<script src="../../js/wow.js"></script>
<script src="../../js/ajax-form.js"></script>
<script src="../../js/beforeafter.jquery-1.0.0.min.js"></script>
<script src="../../js/main.js"></script>
<script src="../../js/vue.global.js"></script>
<script src="../../js/axios.min.js"></script>
</body>
<script>
    const app = {
        data() {
            return {
                orderitem: {},
                product: {},
                review: {}
            }
        },
        methods: {
            addReview: function () {
                if (confirm("确认提交评价吗？")) {
                    let params = new FormData();
                    params.append('orderitemid', this.orderitem.id);
                    params.append('content', this.review.content);
                    axios.post('/review/create', params)
                        .then((response) => {
                            alert('提交成功')
                            setTimeout(location.href='/url/orderdetail/'+this.orderitem.orderid, 2000);
                        })
                        .catch((error) => {
                            console.error(error);
                            alert('提交失败')
                        })
                }
            },
            listProduct: function () {
                location.href = '/url/prolist?keyword=' + this.keyword
            },
        },
        created() {
            let _this = this
            let params = location.pathname.split('/url/review/');
            let id = params[1]
            axios.get('/orderitem/'+id)
                .then((response) => {
                    _this.orderitem = response.data.data
                    _this.product = response.data.data.product
                    if (_this.orderitem.revid != null) {
                        axios.get('/review/'+_this.orderitem.revid)
                            .then((response1) => {
                                _this.review = response1.data.data
                            })
                            .catch((error) => {
                                console.error(error);
                                alert('初期化错误')
                            })
                    }
                })
                .catch((error) => {
                    console.error(error);
                    alert('初期化错误')
                })
        }
    }
    Vue.createApp(app).mount('body')
</script>